package com.alibaba.mapper;

import com.alibaba.bean.Pk;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface PkMapper {
    @Insert(value = "insert into rank1(userId,faceValue,gender,age,smile,emotion,skinHealth,skinStain,skinAcne,skinDarkCircle,imgUrl) values(#{userId},#{faceValue},#{gender},#{age},#{smile},#{emotion},#{skinHealth},#{skinStain},#{skinAcne},#{skinDarkCircle},#{imgUrl})")
    void insertPk(int userId,float faceValue,int gender,int age,float smile,int emotion,float skinHealth,float skinStain ,float skinAcne,float skinDarkCircle,String imgUrl);

    @Select(value ="select * from pk where hoursenum=#{hoursenum}")
    Pk selectUserId1(int hoursenum);

    @Select(value ="select * from pk where hoursenum=#{hoursenum}")
    Pk selectUserId2(int hoursenum);

    @Update(value ="update pk set Id1=#{userId} where hoursenum=#{hoursenum}")
    void updatePk1(int userId,int hoursenum);

    @Update(value ="update pk set Id2=#{userId} where hoursenum=#{hoursenum}")
    void updatePk2(int userId,int hoursenum);

    @Insert(value ="insert into pk(hoursenum) value(#{hoursenum})")
    void insertPk3(int hoursenum);

    @Delete(value = "delete from pk where hoursenum=#{hoursenum}")
    void deletePk(int hoursenum);

    @Select(value = "select * from pk where hoursenum=#{hoursenum}")
    Pk selectHoursenum(int hoursenum);



}
